﻿using System;
using System.Collections.Generic;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data.OleDb;
using System.Text;

namespace Web_HengliSeed.zh_cn
{
    public partial class Default : PageBase
    {
        public string SilderHtml = string.Empty;
        public string SmallHtml = string.Empty;

        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                Response.Redirect("Information.aspx?action=about2");
                GetSilderShow();
            }
        }

        public void GetSilderShow()
        {
            using (OleDbDataReader read = BLL.BringInfo.GetNoteMesAll(language))
            {
                StringBuilder sbHtml = new StringBuilder();
                StringBuilder sbSmall = new StringBuilder();

                sbHtml.Append("<ul class='ei-slider-large'>");
                sbSmall.Append("<ul class='ei-slider-thumbs'>");
                sbSmall.Append("<li class='ei-slider-element'>Current</li>");
                while (read.Read())
                {
                    sbHtml.Append("<li>");
                    sbHtml.AppendFormat("<img src='../UpLoad/image/{0}' />", read["T_BringImage"].ToString());
                    sbHtml.Append("<div class='ei-title'>");
                    sbHtml.AppendFormat("<h2>{0}</h2>", read["T_BringTitle"].ToString());
                    sbHtml.Append("</div></li>");

                    sbSmall.AppendFormat("<li><a href='#'>Slide</a><img src='../UpLoad/image/small/{0}'  /></li>", read["T_BringImage"].ToString());

                }
                sbHtml.Append("</ul>");
                sbSmall.Append("</ul>");

                SilderHtml = sbHtml.ToString();
                SmallHtml = sbSmall.ToString();
            }
        }
    }
}